package com.fs.user.domain.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import reactor.util.annotation.Nullable;

import javax.validation.constraints.Email;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(description = "用户更新实体")
public class UserUpdateDTO {
    @ApiModelProperty(value = "密码")
    @Nullable
    private String password;

    @ApiModelProperty(value = "重复密码")
    @Nullable
    private String repassword;

    @ApiModelProperty(value = "昵称")
    @Nullable
    private String nickname;

    @ApiModelProperty(value = "手机号")
    @Nullable
    @Pattern(regexp = "^$|^1[3-9]\\d{9}$", message = "手机号格式不正确")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    @Nullable
    @Email(regexp = ".*", message = "邮箱格式不正确")
    private String email;
}
